//
//  FPProtocolModel.h
//  FinanceProject
//
//  Created by 陈显摆 on 2025/2/13.
//

#import <JSONModel/JSONModel.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger , FPProtocolType) {
    
    FPProtocolTypeListController, //!< 我的->查看协议 返回的列表
    FPProtocolTypeFirstEntry, //! 首次进入App
    FPProtocolTypeLogin, //!< 登录
    FPProtocolTypeBankCard, //!< 银行卡
    FPProtocolTypeLoan, //!< 借款
    FPProtocolTypeAuthentic, //!< 实名认证
    FPProtocolTypeConfirmContract, //!< 确认借款页面
    FPProtocolTypeCleanAccount, //!< 注销
    FPProtocolTypeSettingUserProtocol, //!< 设置 -> 用户服务协议
    FPProtocolTypeSettingPrivacyProtocol, //!< 设置 -> 隐私保护
    FPProtocolTypeUserProfile2, //!< 留资2页面
};

@interface FPProtocolModel : JSONModel

@property (nonatomic , strong) NSString *address; //!< 协议地址
@property (nonatomic , strong) NSString *agreementName; //!< 协议名称
@property (nonatomic , strong) NSString *agreementType; //!< 协议类型
@property (nonatomic , strong) NSString *createTime;
@property (nonatomic , strong) NSString *status; //!< 状态 0代表草稿 1代表已生效 2代表已过期

@property (nonatomic , strong) NSString *ID;

// 在获取已签署协议信息时 用到的字段
@property (nonatomic , strong) NSString *agreementAddress;
@property (nonatomic , strong) NSString *agreementId;
@property (nonatomic , strong) NSString *agreementVersion;
@property (nonatomic , strong) NSString *companyName;

@property (nonatomic , strong) NSString *idNumber;
@property (nonatomic , strong) NSString *signDate;
@property (nonatomic , strong) NSString *userId;
@property (nonatomic , strong) NSString *userName;
@property (nonatomic , strong) NSString *userPhone;




/**
 * 获取协议信息
 */
+ (void)getProtocolWithType:(FPProtocolType)type success:(void (^)(NSInteger code , NSString *message , NSArray *list))success failure:(void (^)(NSError *error))failure;


/**
 * 签署协议
 */
+ (void)protocolSignWithParams:(NSMutableArray *)params success:(void (^)(NSInteger code , NSString *message))success failure:(void (^)(NSError *error))failure;


/**
 * 查看签署协议信息
 */
+ (void)getProtocolSignInfoWithID:(NSString *)ID success:(void (^)(NSInteger code , NSString *message , NSArray *list))success failure:(void (^)(NSError *error))failure;

@end

NS_ASSUME_NONNULL_END
